package com.ehualu.esresult.utils;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @Author: 吴敬超
 * @Date: 2020/7/9 11:10
 */
public class ESurlUtil {
    private static final Logger LOG = LoggerFactory.getLogger(ESurlUtil.class);

    public static String http = "http://";
    public static String search = "_search";

    public static String getUrl(String indexuser) {

        String url = "";

        LoadProperties loadProc = LoadProperties.getInstance();

        String index = loadProc.getValues(indexuser, "exp-vehicle-realtime");

        String esuser = ESserversUtil.getESser();

        url = http + esuser + "/" + index + "/" + search;

        LOG.info("es url is " + url);


        return url;
    }

}
